<!--<!DOCTYPE html>-->
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
	</body>
	<script>
		function Fish(x,y,w,h,bgimg,count,time){
			var e=document.createElement("div");
			var s=e.style;
			s.left=x;
			s.position="absolute"
			s.top=y;
			s.width=w;
			s.height=h/count;
			s.background="url("+bgimg+")";
			document.body.appendChild(e);
			
			var bgy=0;
			var timer = setInterval(function(){
				bgy = bgy - parseInt(s.height);
				if(bgy==-parseInt(s.height)*count/2) bgy = 0;
				s.background = "url("+bgimg+") 0px "+bgy+"px";
			},time);
		}
		
		
			var f1=new Fish(10,10,178,1870,"fish10.png",10,100);
			var f2=new Fish(200,10,166,2196,"fish9.png",12,100);
			var f3=new Fish(400,20,59,296,"fish1.png",8,100);
		
	</script>
</html>
